package com.atomic.test.example.entity;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by DreamYao on 2017/1/24.
 */
@Entity
@Table(name = "t_login_log")
@EntityListeners(AuditingEntityListener.class)
public class LoginLog extends AbstractEntity<Integer> implements Serializable {
    private static final long serialVersionUID = -7318278109743008657L;

    /**
     * 发表者ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 登录IP
     */
    @Column(name = "ip")
    private String ip;

    /**
     * 登录时间
     */
    @Column(name = "login_datatime")
    private Date loginDataTime;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getLoginDataTime() {
        return loginDataTime;
    }

    public void setLoginDataTime(Date loginDataTime) {
        this.loginDataTime = loginDataTime;
    }
}
